package com.wondertek.poms.dao.po;

import java.time.LocalDateTime;

import javax.persistence.*;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;

import lombok.Data;

/**
 * <p><b>PcOperateLog Description:</b> PcOperateLog po类 ; 操作日志表</p>
 * @author 窦再兴
 * <p><b>DATE</b> 2019-08-12 18:16:01</p>
 */
@Data
@Entity
@Table(name = "pc_operate_log")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PcOperateLog implements java.io.Serializable {
	
	/**
	 * <b>Fields</b> serialVersionUID :
	 * SEQ_OPERATE_LOG_ID
	 *
	 */
	private static final long serialVersionUID = -7266398179300058825L;

	/**
	 * <b>Fields</b> id : 主键ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_OPERATE_LOG_ID")
	@SequenceGenerator(name = "SEQ_OPERATE_LOG_ID", sequenceName = "SEQ_OPERATE_LOG_ID",allocationSize = 1)
	private Long id;
	
	/**
	 * <b>Fields</b> ip : ip地址
	 */
	private String ip;
	
	/**
	 * <b>Fields</b> userName : 操作人
	 */
	@Column(name = "user_name")
	private String userName;
	
	/**
	 * <b>Fields</b> model : 模块名称
	 */
	private String model;
	
	/**
	 * <b>Fields</b> url : 访问路径
	 */
	private String url;
	
	/**
	 * <b>Fields</b> params : 方法参数
	 */
	private String params;
	
	/**
	 * <b>Fields</b> operateType : 操作状态 1:新增 2:修改 3:删除 4:发布 5 撤回 6：导入 7：导出 8：模板下载 9:媒资入包
	 */
	@Column(name = "operate_type")
	private Integer operateType;
	
	/**
	 * <b>Fields</b> exceptionFlag : 是否异常 1成功，0失败
	 */
	@Column(name = "exception_flag")
	private Boolean exceptionFlag;
	
	/**
	 * <b>Fields</b> createdTime : 创建时间 YYYY-MM-DD HH24:MI:SS
	 */
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "created_time")
	private java.time.LocalDateTime createdTime;
	
	/**
	 * <b>Fields</b> startTime : 开始时间 YYYY-MM-DD HH24:MI:SS
	 */
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Transient
	private LocalDateTime startTime;

	/**
	 * <b>Fields</b> endTime : 结束时间 YYYY-MM-DD HH24:MI:SS
	 */
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Transient
	private LocalDateTime endTime;
	
	public static void putTimeAndUser(PcOperateLog pcOperateLog) {
	}
}